#pragma once
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>

typedef int HPDateType;
typedef struct Heap
{
	HPDateType* a;
	int size;
	int capacity;
}HP;

void HeapInit(HP* php);
void HeapDestroy(HP* php);

void HeapPush(HP* php,HPDateType x);
void HeapPop(HP* php);

HPDateType HeapTop(HP* php);
 
bool HeapEmpty(HP* php);
int HeapSize(HP* php);

void AdjustUp(HP* php,int child);
void AdjusrDown(HP* php, int n, int parent);
